<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <h:head>
        <title>合同内容</title>
        <script type="text/javascript">
            function updateContractNumber(mcname,mnumber)
            {
                window.opener.updateContractNumber(mcname,mnumber);
                window.close();
            }
        </script>
    </h:head>
    <h:form>
        <rich:panel header="主合同列表">

            <rich:dataTable id="incontractTable" value="#{contract.contractlist}" var="contli"
                            rowClasses="list-row-odd,list-row-even"
                            headerClass="table-header" >
                <rich:column sortBy="#{contli.number}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="编号"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:commandLink onclick="updateContractNumber('#{contli.cname}','#{contli.number}');">
                        <h:outputText value="#{contli.number}"/>
                    </h:commandLink>
                </rich:column>
                <rich:column sortBy="#{contli.cname}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="名称"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.cname}"/>
                </rich:column>
                <rich:column sortBy="#{contli.contracttype.name}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="合同类别"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.contracttype.name}"/>
                </rich:column>
                <rich:column sortBy="#{contli.gType.name}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="合同内容"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.gType.name}"/>
                </rich:column>
                <rich:column sortBy="#{contli.address}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="地点"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.address}">
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{contli.orderdate}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="签订日期"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.orderdate}">
                        <f:convertDateTime dateStyle="medium"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{contli.start}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="开始日期"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.start}">
                        <f:convertDateTime dateStyle="medium"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{contli.deadline}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="截止日期"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.deadline}">
                        <f:convertDateTime dateStyle="medium"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{contli.warranty}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="保质日期"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.warranty}">
                        <f:convertDateTime dateStyle="medium"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{contli.nameA}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="甲方"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.nameA}"/>
                </rich:column>
                <rich:column sortBy="#{contli.nameAstand}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="甲方法人"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.nameAstand}"/>
                </rich:column>
                <rich:column sortBy="#{contli.partner.name}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="乙方"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.partner.name}"/>
                </rich:column>
                <rich:column sortBy="#{contli.partner.legalPerson}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="乙方法人"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.partner.legalPerson}"/>
                </rich:column>
                <rich:column sortBy="#{contli.target}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="标的"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.target}"/>
                </rich:column>
                <rich:column sortBy="#{contli.quality_margin}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="质保金"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.quality_margin}"/>
                </rich:column>
                <rich:column sortBy="#{contli.penalty}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="违约金"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.penalty}"/>
                </rich:column>
                <rich:column sortBy="#{contli.other}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="其他"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.other}"/>
                </rich:column>
                <rich:column sortBy="#{contli.pay}">
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="付款条件"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{contli.pay}"/>
                </rich:column>
            </rich:dataTable>

        </rich:panel>
    </h:form>
</ui:composition>


